void kernel MinMaxRanges(__global int *indices,
		            __global float *coords,
		            __global float *coeffs.
		            const unsigned int numElems)
{
	static const double NDIV = 9;
		static const double dx = 1.0/NDIV;
		static const double dy = dx;
		static const double dz = 2.0/NDIV;
	    static const int control = 1;
	   	int Pdeg[3];
		int base = parentFieldPtr->GetDegreeVector(this->index.eid,Pdeg);
		double coords[3*numVertices];
		(void)this->convert(this->vertices[0].v, coords);
		// Loops over 10 point in each directions
		CVec3d pt(0.0, 0.0, -1.0);
		for (int k = 0; k <= Pdeg[2]; ++k)
			for (int j = 0; j <= Pdeg[1]; ++j)
				for (int i = 0; i <= Pdeg[0] - j; ++i) {
					// vertexy trzeba zamnienic na dopuible albo dac templata na floata
					parentFieldPtr->CalculateSolution(control,pdeg,base,coords, pt.v, NULL, NULL, NULL, NULL);
					pt.x += dx;
					pt.y += dy;
					pt.z += dz;
				}
}
